import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter as Router, Route, Switch} from 'react-router-dom';
import Login from './pages/login';
import MainPage from './pages/mainPage/MainPage';


const App = () => {
    return (
        <Router>
            <Switch>

                <Route path="/login">
                    <Login/>
                </Route>
                <Route path="/main">
                    <MainPage/>
                </Route>
                <Route path="/">
                    <Login/>
                </Route>
                {/*<Route path="/">*/}
                {/*    <Redirect to="/main"/>*/}
                {/*</Route>*/}
            </Switch>
        </Router>
    );
};

ReactDOM.render(<App/>, document.getElementById('root'));

